package com.simp.utils;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * @author pan.shun
 * @since 2022/3/16 20:32
 */
public class ExceptionUtils {

    /**
     * 异常信息输出字符串
     */
    public static String print(Throwable t) {
        StringWriter sw = new StringWriter();
        t.printStackTrace(new PrintWriter(sw, true));
        return sw.getBuffer().toString();
    }

}
